/*
 * @(#)CollatorComparator.java    Jul 5, 2010
 *
 * Copyright 2009 Nyber Shanghai, Inc. All rights reserved.
 */

package com.lab.util.collection;

import java.io.Serializable;
import java.util.Comparator;

import com.lab.Student;

/**
 * Class description goes here.
 *
 * @author nickevin@gmail.com
 * @version Jul 5, 2010 11:12:30 AM
 */

public class DefaultComparator implements Comparator<Student>, Serializable {

	private static final long serialVersionUID = -6375258710707454199L;

	public int compare(Student a, Student b) {
		if (a == null || b == null) {

			return 0;
		}

		//return a.getFirstName().compareTo(b.getFirstName());
		return -a.getFirstName().compareTo(b.getFirstName());
	}
}
